import request from '../utils/request.js'

//库存管理列表(可滑动)
export const getSlotLeft = (data) => {
  return request({
    url: `/applet/inventory/slot/list`,
    method: "get",
    data,
  })
}
//库存管理列表(搜索不可滑动)
export const getSlotRight = (data) => {
  return request({
    url: `/applet/inventory/medicine/list`,
    method: "get",
    data,
  })
}
//库存管理详情
export const getSlotDetail = (id) => {
  return request({
    url: `/applet/slot/${id}`,
    method: "get",
  })
}
//出药列表
export const getTakeOutList = (data) => {
  return request({
    url: `/applet/inventory/takeOut/list`,
    method: "get",
    data,
  })
}
//确认取药
export const takeOutSure = (data) => {
  return request({
    url: `/applet/inventory/takeOut`,
    method: "post",
    data,
  })
}
//收回机械臂
export const retract = (data) => {
  return request({
    url: `/applet/inventory/retract`,
    method: "post",
    data,
  })
}
// 补药
export const refillMedicine = (data) => {
  return request({
    url: `/applet/inventory/refillMedicine`,
    method: "get",
    data,
  })
}
// 生成追溯码
export const generateTraceCode = (data) => {
  return request({
    url: `/applet/inventory/generateTraceCode`,
    method: "get",
    data,
  })
}
// 复位
export const resetInventory = (data) => {
  return request({
    url: `/applet/inventory/reset`,
    method: "get",
    data,
  })
}